﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<brjostagjof.Models.Question>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Lesa spurningu
</asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <a href="/Home/SogS/" class="linksWhite">Til baka í S. og S.</a>

    <h2 class="title"><%: Model.ArticleBase.InformationBase.headline %></h2>
    <p class="meta">Höfundur: <a href="../../MySite/ViewUserByID/<%:Model.ArticleBase.User.ID  %>"><%: Model.ArticleBase.User.name%></a>, <%: Model.ArticleBase.InformationBase.date %>  &nbsp;&bull;&nbsp;
    <a href="/Home/GetQuestionsByCategoryID/<%: Model.ArticleBase.ArticleCategory.ID %>" class="permalink"> <%: Model.ArticleBase.ArticleCategory.name %></a>
    <span id="baetaSafn<%:Model.articleBaseID %>">&nbsp;&bull;&nbsp;<a href="#"  onclick="saveGrein(<%= Model.articleBaseID %>);">Bæta í Safn</a></span>
    </p>
    <span id="<%:Model.articleBaseID %>"></span>
    <div class="entry">
    <div class="entry-bgtop">
    <div class="entry-bgbtm">
        <span class="ToBold">Nánari lýsing:</span>
        <p><%= Model.ArticleBase.InformationBase.context %></p>
        <br />
        <% if (Model.specialistID != null)
           { %>
        <span class="ToBold">Svar:</span>
        <p><%= Model.ArticleBase.Question.answer%></p>
        <p class="meta"><a  href="../../MySite/ViewUserByID/<%: Model.SpecialistUser.User.ID%>" ><%: Model.SpecialistUser.User.name%></a> <%: Model.SpecialistUser.SpecialistCategory.name%>:</p>
        <%} %>
    </div>
    </div>
    </div>
    <% if (Model.ArticleBase.User.userName == Page.User.Identity.Name)
       { %>
        <p><a href="/Home/EditQuestion/<%: Model.articleBaseID %>">Breyta spurningu</a></p>
    <% } %>
    <% if(Page.User.IsInRole("Specialists") || Page.User.IsInRole("Administrators"))
       { %>
    <p><a href="/Home/EditAnswer/<%: Model.articleBaseID %>">Breyta svari</a></p>
    <% } %>
</asp:Content>